#ifndef SECINFO_H
#define SECINFO_H
#include<QObject>


#include<QString>
class SecInfo :public QObject
{
    
private:
    bool gas;
    int tem;
    bool Illegal;
    int hum;  //湿度
    int subNum;       // 子结点的编号
    QString mac;  // mac 地址编号

    QString subMac ;
public:
    SecInfo();
    // 禁用拷贝构造
    SecInfo( const SecInfo & secinfo) =delete;
    SecInfo(SecInfo &&secinfo);
    int getGas()const;
    int getTem()const;
    int getIllegal()const;
    int getHum() const;
    QString getMac()const;
    int getSubNum()const;
    QString getSubMac()const;
    
    void setGas(int gas);
    void setTem(int tem);
    void setIllegal(bool i);
    void setHum(int hum);
    void setMac(QString macaddr);
    void setSubNum(int subNum);
    void setSubMac(const QString &mac);
    
    QString toJSON();
    // 反序列化json字符串.....
    SecInfo parseSecInfo(QString text);
    
};

#endif // SECINFO_H
